import React, {PureComponent} from 'react';
import {ButtonGroup} from 'jh-lib';

export default class Test extends PureComponent {

    /**
     * 用于模拟 afc 中，按钮组件调用应用实例的方法
     */
    setBtnInsById(id, ins, customprops) {
        console.log('setBtnInsById', id, ins, customprops)
    }

    /**
     * 用于模拟 afc 中，按钮组件调用应用实例的方法
     */
    handleClickBtn(e, id, customprops) {
        console.log('handleClickBtn', e, id, customprops)
    }

    render() {
        return (
            <>
                <h3>按钮类型</h3>
                <div className={'demo-contain'}>
                    <ButtonGroup
                        appins={this}
                        customprops={{page: 'test'}}
                        buttons={[
                            {id: 'button1', name: '按钮1'},
                            {id: 'button2', name: '按钮2'},
                            {id: 'button3', name: '按钮3'},
                        ]}
                    >
                        按钮组
                    </ButtonGroup>
                </div>
            </>
        )
    }
}